﻿@model NationalIT.Maintenance
@{
    ViewBag.Title = "Maintenance";
}
<div class="row-fluid Maintenance">
    <div class="span12">
        <div class="box">
            <div class="box-title">
                <h3>
                    <i class="icon-table"></i>Maintenance</h3>
            </div>
            <div class="box-content">
                <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
                <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
                @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal" }))
                {
                    @Html.ValidationSummary(true)                    

                    @Html.HiddenFor(model => model.Id)
                    
                    <div class="control-group">
                        <label class="control-label" for="Track_Trailer_Number">
                            Equipment_number</label>
                        <div class="controls">
                            <div class="span12">
                                <select data-placeholder="Select Equipment" name="Track_Trailer_Number" class="chosen-with-diselect input-xlarge">
                                    @Html.Raw(ViewBag.dataEquipment)
                                </select>
                                @Html.ValidationMessageFor(model => model.Track_Trailer_Number)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Maintenance_performed">@Html.LabelFor(model => model.Maintenance_performed)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Maintenance_performed, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.Maintenance_performed)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Performed_date">@Html.LabelFor(model => model.Performed_date)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Performed_date, new { Value = Model != null && Model.Performed_date.HasValue ? Model.Performed_date.Value.ToString("MM/dd/yyyy") : "", @class = "input-xlarge  date-picker" })
                                @Html.ValidationMessageFor(model => model.Performed_date)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="Location">@Html.LabelFor(model => model.Location)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.Location, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.Location)
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="PO_">@Html.LabelFor(model => model.PO_)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.PO_, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.PO_)
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="ApprovedAmount">@Html.LabelFor(model => model.ApprovedAmount)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.ApprovedAmount, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.ApprovedAmount) ($)
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="SpentAmount">@Html.LabelFor(model => model.SpentAmount)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.SpentAmount, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.SpentAmount) ($)
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="ApprovedBy">@Html.LabelFor(model => model.ApprovedBy)</label>
                        <div class="controls">
                            <div class="span12">
                                @Html.TextBoxFor(model => model.ApprovedBy, new { @class = "input-xlarge" })
                                @Html.ValidationMessageFor(model => model.ApprovedBy)
                            </div>
                        </div>
                    </div>
                    <div class="form-actions">
                        @Html.Partial("_ShowSaveEdit")
                    </div>
                }
            </div>
        </div>
    </div>
</div>
